
#pragma once

#include <typeinfo>
#include <cstdint>
#include <string>
#include <vector>
#include <list>
#include <map>

#include "variant_category.h"

#define REGISTER_TYPE(type_name, enum_name, enum_category, string_name,  work_status)                      \
    template <>struct Enum2Type<enum_name>     { enum { eTYPE = enum_name }; typedef type_name Type;    }; \
    template <>struct Type2Enum<type_name>     { enum { eVALID = 1 }; enum { eTYPE = enum_name }; typedef type_name Type;    }; \
    template <>struct Enum2Category<enum_name> { enum { eCATEGORY = enum_category }; };                    \
    template <>struct Enum2Name<enum_name>     { static const char* Name() { return string_name;    }   }; \
    template <>struct WorkStatus<enum_name>    { enum { eSTATUS = work_status }; }

namespace tools
{
    namespace variant_detail
    {
        struct SEmpty;
        template <class T> struct Type2Enum    { enum { eVALID = 0 }; };
        template <size_t N>struct Enum2Type;
        template <size_t N>struct Enum2Name;
        template <size_t N>struct Enum2Marker;
        template <size_t N>struct Enum2Category;
        template <size_t N>struct WorkStatus;

    }//namespace value_detail
}//namespace tools

